package init;

/**
 * @ClassName TestInit
 * @Author ykx
 * @Date 2024/6/22 10:25
 * @Version 1.0
 */
public class TestInit2 {
    public static void main(String[] args) {
        System.out.println(Sub.B);
    }

    static class Parent {
        public static int A = 1;

        static {
            A = 2;
        }
    }

    static class Sub extends Parent {
        public static int B = A;
    }


}
